﻿using System.Collections.Generic;
using Beeldbankmvc.Models;
using System;
using Beeldbankmvc.Code;

namespace Beeldbankmvc.ViewModels
{
    public class ShoppingCartViewModel
    {
        public List<BEELDBANK_ORDERREGEL_WINKELWAGEN> CartItems { get; set; }
        public string CartUserId { get; set; }
        public EditAccountModel currentAccountModel { get; set; }

        public decimal CartTotal { get; set; }


        public String getUserEmail()
        {
            String retVal = "";

            if(currentAccountModel != null)
            {
                UserRepository userRep = new UserRepository();
                retVal = userRep.FindOnesEmailByName(currentAccountModel.UserId);
            }
            return retVal;
        }

        public String getCountryNameById(String CoutryId)
        {
            return Countries.getCountryNameById(CoutryId);
        }


    }
}